package com.bjgzy.courselive.di.module;

import android.support.v7.widget.LinearLayoutManager;

import com.bjgzy.courselive.mvp.contract.MyCourseContract;
import com.bjgzy.courselive.mvp.model.MyCourseModel;
import com.bjgzy.courselive.mvp.ui.adapter.MyCourseMultiAdapter;
import com.eduhzy.ttw.commonsdk.entity.MyCourseData;
import com.jess.arms.di.scope.ActivityScope;

import java.util.ArrayList;
import java.util.List;

import dagger.Binds;
import dagger.Module;
import dagger.Provides;

/**
 * @author xubo
 * @date 2018-8-1 14:57:37
 */
@Module
public abstract class MyCourseModule {

    @Binds
    abstract MyCourseContract.Model bindMyCourseModel(MyCourseModel model);

    @ActivityScope
    @Provides
    static List<MyCourseData> provideList() {
        return new ArrayList<>();
    }
    @ActivityScope
    @Provides
    static MyCourseMultiAdapter provideActivityAdapter(List<MyCourseData> list) {
        return new MyCourseMultiAdapter(list);

    }

    @ActivityScope
    @Provides
    static LinearLayoutManager provideLayoutManger(MyCourseContract.View view) {
        return new LinearLayoutManager(view.getActivity());
    }

}